home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / optimus / agata / home.dir / 00007_1 chan mov.ls < prev    next >
Encoding:
Text File  |  1997-02-20  |  646 b   |  27 lines

  1. property myChan, maxFrames, currFrame, castList, xList, yList
  2. global theCoord
  3.  
  4. on birth me, chan
  5.   set myChan to chan
  6.   set the stretch of sprite myChan to 0
  7.   return me
  8. end
  9.  
  10. on startAnimation me
  11.   set currFrame to 1
  12. end
  13.  
  14. on Animate me
  15.   if currFrame <= maxFrames then
  16.     set castIndex to getAt(castList, currFrame)
  17.     set the locH of sprite myChan to getAt(xList, currFrame)
  18.     set the locV of sprite myChan to getAt(yList, currFrame)
  19.     set the castNum of sprite myChan to castIndex
  20.   end if
  21.   if currFrame > maxFrames then
  22.     set the castNum of sprite myChan to 0
  23.     RemoveBOL(theCoord, me)
  24.   end if
  25.   set currFrame to currFrame + 1
  26. end
  27.